#ifndef  __ZOOM_TACE_H_
#define	 __ZOOM_TACE_H_

#include "swallow.h"

#ifdef	ZOOM_T_GLOBAL
	#define	ZOOM_T_EXT	
#else
	#define	ZOOM_T_EXT	extern
#endif


#define ZOOMT_VERSION 		100

#define	LARGE_TRUMPET_T5183_LEN1		15 
#define	LARGE_TRUMPET_T5183_LEN2		80 
#define	LARGE_TRUMPET_T5183_LEN3		80 
#define	LARGE_TRUMPET_T5183_LEN4		250 
#define	LARGE_TRUMPET_T5183_LEN5		1000

#define	LARGE_TRUMPET_F062_LEN1		    24 
#define	LARGE_TRUMPET_F062_LEN2		    62 
#define	LARGE_TRUMPET_F062_LEN3		    220 
#define	LARGE_TRUMPET_F062_LEN4		    620 
#define	LARGE_TRUMPET_F062_LEN5		    2000


#define	LARGE_TRUMPET_F028_LEN1		    14 
#define	LARGE_TRUMPET_F028_LEN2		    62 
#define	LARGE_TRUMPET_F028_LEN3		    200 
#define	LARGE_TRUMPET_F028_LEN4		    560 
#define	LARGE_TRUMPET_F028_LEN5		    1800

#define	LARGE_TRUMPET_F027_LEN1		    12 
#define	LARGE_TRUMPET_F027_LEN2		    36 
#define	LARGE_TRUMPET_F027_LEN3		    100 
#define	LARGE_TRUMPET_F027_LEN4		    520 
#define	LARGE_TRUMPET_F027_LEN5		    2000

#define	LARGE_TRUMPET_F124_LEN1		    10 
#define	LARGE_TRUMPET_F124_LEN2		    52 
#define	LARGE_TRUMPET_F124_LEN3		    280 
#define	LARGE_TRUMPET_F124_LEN4		    520 
#define	LARGE_TRUMPET_F124_LEN5		    2000


#define	LARGE_TRUMPET_T5291_LEN1		34 
#define	LARGE_TRUMPET_T5291_LEN2		128 
#define	LARGE_TRUMPET_T5291_LEN3		360 
#define	LARGE_TRUMPET_T5291_LEN4		1420 
#define	LARGE_TRUMPET_T5291_LEN5		4050


#define	LARGE_TRUMPET_T5391_LEN1		34 
#define	LARGE_TRUMPET_T5391_LEN2		128 
#define	LARGE_TRUMPET_T5391_LEN3		360 
#define	LARGE_TRUMPET_T5391_LEN4		1060 
#define	LARGE_TRUMPET_T5391_LEN5		1800



#define	LARGE_TRUMPET_T5375_LEN1		34 
#define	LARGE_TRUMPET_T5375_LEN2		128 
#define	LARGE_TRUMPET_T5375_LEN3		360 
#define	LARGE_TRUMPET_T5375_LEN4		1420 
#define	LARGE_TRUMPET_T5375_LEN5		4050


#define	LARGE_TRUMPET_T5709_LEN1		20 
#define	LARGE_TRUMPET_T5709_LEN2		64 
#define	LARGE_TRUMPET_T5709_LEN3		160 
#define	LARGE_TRUMPET_T5709_LEN4		240 
#define	LARGE_TRUMPET_T5709_LEN5		360

#define	LARGE_TRUMPET_T5188_LEN1		28 
#define	LARGE_TRUMPET_T5188_LEN2		88 
#define	LARGE_TRUMPET_T5188_LEN3		160 
#define	LARGE_TRUMPET_T5188_LEN4		260 
#define	LARGE_TRUMPET_T5188_LEN5		350

#define	LARGE_TRUMPET_F140_LEN1			30 
#define	LARGE_TRUMPET_F140_LEN2			360 
#define	LARGE_TRUMPET_F140_LEN3			1410 
#define	LARGE_TRUMPET_F140_LEN4			3800 
#define	LARGE_TRUMPET_F140_LEN5			7000


#define	CONTINUE_DOWN_CNT_NIGHT		4
#define	CONTINUE_DOWN_CNT_DAY		2//3
#define	ICR_THICK_OFFSET			0

#define DELAY_TIME_MAX				2


#define	FIELD_DEPTH_LENGTH			4 
#define	STEP_ADJ_COUNT				4 
#define ZOOMT_ZOOM_DIS_LEN		    6

typedef  struct
{
	SW_INT TraceData[8];
	SW_INT TraceHighFreData[8];
	SW_INT ZoomTStartPos[5];
    SW_INT ZoomTClacPos[7];

}ZoomTPara;

typedef  struct
{
	SW_INT16 *PredictCurve1;
	SW_INT16 *PredictCurve2;
	SW_BOOL  Extra;
	SW_FLOAT Rate;
}ZoomRateDef;

ZOOM_T_EXT ZoomTPara ZoomTParaList;
ZOOM_T_EXT ZoomRateDef	ZoomStru;
ZOOM_T_EXT SW_BOOL FirstWideFlag ;
ZOOM_T_EXT SW_INT ZoomTMaxFocus; 
ZOOM_T_EXT SW_INT ZoomTMaxZoom; 
ZOOM_T_EXT SW_FLOAT ZoomTRatio; 
ZOOM_T_EXT SW_FLOAT ZoomDirectRatio; 
ZOOM_T_EXT SW_INT ZoomDirectFocus; 
ZOOM_T_EXT SW_INT ZoomDirectZoom; 
ZOOM_T_EXT SW_INT ZoomDirectFlag; 


extern void     ZoomTParaInit(void);
extern SW_BOOL	DevDriverZoomAJ(SW_INT step, SW_INT N);
extern void 	RunMotorAndGetZoomTraceInfo(SW_INT NO);
extern void 	ZoomTHookEnter(void);

#endif


